/<template>
  <div>
    <div v-for="item, index in classifyList" :key="index"
        :class="index === activeIndex ? 'actived' : ''"
        @click="handleClick(index)"
    >
          {{item.title}}
      </div>
      -------
      <div v-for="item, index in classifyList[activeIndex].conList" :key="index">
          {{item.title}}
      </div>
  </div>
</template>

<script>
import { mapActions, mapState } from 'vuex'
export default {
    data() {
        return {
            activeIndex: 0
        }
    },
    mounted() {
        this.getTabs()
    },
    computed: {
        ...mapState(['classifyList'])
    },
    methods: {
        ...mapActions(['getTabs']),
        handleClick(index) {
            this.activeIndex = index
        }
    },
}
</script>

<style>
.actived {
    color: red;
}
</style>